<?php load_lib('/util/file'); ?>
<div class="divOption"><a href="<?php echo $arrData['strAddEpURL']; ?>">添加剧集</a> <a href="<?php echo $arrData['strEditEpURL']; ?>">编辑剧集</a> <a href="<?php echo $arrData['strEditSeriesURL']; ?>">编辑节目</a></div>
<div class="divEpDetail">
	<table class="tblEpDetail">
		<tr>
			<th>中文名称:</th>
			<td><?php echo $arrHtml['arrSeries']['CNAME']; ?></td>
			<th>节目种类:</th>
			<td><?php echo $arrHtml['arrSeries']['CLASSSTR']; ?></td>
		</tr>
		<tr>
			<th>英文名称:</th>
			<td><?php echo $arrHtml['arrSeries']['ENAME']; ?></td>
			<th>节目分类</th>
			<td><?php echo $arrHtml['arrSeries']['TYPESTR']; ?></td>
		</tr>
		<tr>
			<th>节目分辨率:</th>
			<td><?php echo $arrHtml['arrSeries']['RATIOSTR']; ?></td>
			<th>下载完成时间:</th>
			<td><?php echo date('Y-m-d H:i:s',$arrHtml['arrSeries']['DOWNLOADTIME']); ?></td>
		</tr>
		<tr>
			<th>剧集数量:</th>
			<td><?php echo $arrHtml['arrSeries']['EPCNT']; ?></td>
			<th>剧集大小:</th>
			<td><?php echo util_file::formatFileSize($arrHtml['arrSeries']['EPSIZE'],'auto-sub-dec'); ?></td>
		</tr>
	</table>
</div>
<form name="frmEditEp" id="frmEditEp" method="post" action="" enctype="application/x-www-form-urlencoded">
<table class="tblList">
	<thead>
		<tr>
			<th> </th>
			<th>文件名</th>
			<th>分辨率</th>
			<th>语言</th>
			<th>顺序</th>
		</tr>
	</thead>
	<tbody>
	<?php foreach($arrData['arrFileList'] as $arrImport){ ?>
	<tr>
		<td class="ct">
		<input name="chkSelect[<?php echo $arrImport['FILEKEY']; ?>]" type="checkbox" id="chkSelect_<?php echo $arrImport['FILEKEY']; ?>" value="<?php echo $arrData['arrViewState']['frmEditEp']['chkSelect_'.$arrImport['FILEKEY']]; ?>"<?php if($arrImport['FILEKEY']==$arrData['arrViewState']['frmEditEp']['chkSelect_'.$arrImport['FILEKEY']]){ ?> checked="checked"<?php } ?> />
		<input type="hidden" name="hidHostID[<?php echo $arrImport['FILEKEY']; ?>]" id="hidHostID_<?php echo $arrImport['FILEKEY']; ?>" value="<?php echo $arrData['arrViewState']['frmEditEp']['hidHostID_'.$arrImport['FILEKEY']]; ?>" />
		<input type="hidden" name="hidSize[<?php echo $arrImport['FILEKEY']; ?>]" id="hidSize_<?php echo $arrImport['FILEKEY']; ?>" value="<?php echo $arrData['arrViewState']['frmEditEp']['hidSize_'.$arrImport['FILEKEY']]; ?>" />
		<input type="hidden" name="hidExt[<?php echo $arrImport['FILEKEY']; ?>]" id="hidExt_<?php echo $arrImport['FILEKEY']; ?>" value="<?php echo $arrData['arrViewState']['frmEditEp']['hidExt_'.$arrImport['FILEKEY']]; ?>" />
		<input type="hidden" name="hidFileName[<?php echo $arrImport['FILEKEY']; ?>]" id="hidFileName_<?php echo $arrImport['FILEKEY']; ?>" value="<?php echo $arrData['arrViewState']['frmEditEp']['hidFileName_'.$arrImport['FILEKEY']]; ?>" />
		</td>
		<td>
		<?php echo $arrImport['FILENAME']; ?>
		</td>
		<td class="ct">
		<select name="dropRatio[<?php echo $arrImport['FILEKEY']; ?>]" id="dropRatio_<?php echo $arrImport['FILEKEY']; ?>">
			<option value="0">请选择</option>
			<?php foreach($arrData['arrRatioList'] as $arrRatio){ ?>
			<option value="<?php echo $arrRatio['RATIOID']; ?>"<?php if($arrData['arrViewState']['frmEditEp']['dropRatio_'.$arrImport['FILEKEY']]==$arrRatio['RATIOID']){ ?> selected="selected"<?php } ?>><?php echo $arrRatio['CNAME']; ?></option>
			<?php } ?>
		</select>
		<?php if(isset($arrData['arrImportErr'][$arrImport['FILEKEY']]) and in_array('Err_Logic_RatioID_NoValue',$arrData['arrImportErr'][$arrImport['FILEKEY']])){ ?><span class="warning">请选择分辨率</span><?php } ?>
		</td>
		<td class="ct">
		<select name="dropLang[<?php echo $arrImport['FILEKEY']; ?>]" id="dropLang_<?php echo $arrImport['FILEKEY']; ?>">
			<option value="0">请选择</option>
			<?php foreach($arrData['arrLangList'] as $arrLang){ ?>
			<option value="<?php echo $arrLang['LANGID']; ?>"<?php if($arrData['arrViewState']['frmEditEp']['dropLang_'.$arrImport['FILEKEY']]==$arrLang['LANGID']){ ?> selected="selected"<?php } ?>><?php echo $arrLang['CNAME']; ?></option>
			<?php } ?>
		</select>
		<?php if(isset($arrData['arrImportErr'][$arrImport['FILEKEY']]) and in_array('Err_Logic_DubLangID_NoValue',$arrData['arrImportErr'][$arrImport['FILEKEY']])){ ?><span class="warning">请选择语言</span><?php } ?>
		</td>
		<td class="ct">
		<input type="text" name="txtOrder[<?php echo $arrImport['FILEKEY']; ?>]" id="txtOrder_<?php echo $arrImport['FILEKEY']; ?>" value="<?php echo $arrData['arrViewState']['frmEditEp']['txtOrder_'.$arrImport['FILEKEY']]; ?>" />
		<?php if(isset($arrData['arrImportErr'][$arrImport['FILEKEY']]) and in_array('Err_Logic_Order_ErrType',$arrData['arrImportErr'][$arrImport['FILEKEY']])){ ?><span class="warning">剧集顺序只能是数字</span><?php } ?>
		</td>
	</tr>
	<?php } ?>
	<tr>
	    <td>
	        <input type="hidden" name="hidAction" id="hidAction" value="<?php echo $arrData['arrViewState']['frmEditEp']['hidAction']; ?>" />
            <input type="hidden" name="hidViewState" id="hidViewState" value="<?php echo $arrData['arrViewState']['frmEditEp']['hidViewState']; ?>" />
            <input type="hidden" name="hidFormID" id="hidFormID" value="frmEditEp" />
	    </td>
	    <td colspan="4"><input type="submit" id="btnSubmit" value="提交" /></td>
	</tr>
	</tbody>
</table>
</form>